package com.scf.contract.controller;

import com.scf.contract.entity.ContractInformation;
import com.scf.contract.service.ContractInformationService;
import com.scf.uitl.ResponseResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author author
 * @create 2021-11-22-19:35
 */
@RestController
@RequestMapping("/contractinformation")
public class ContractInformationController {
    @Resource
    ContractInformationService contractInformationService;

    @GetMapping("/all")
    public ResponseResult selectAll(){
        List<ContractInformation> contractInformations = contractInformationService.selectAll();
        ResponseResult responseResult = new ResponseResult();
        responseResult.setCode(200);
        responseResult.setData(contractInformations);
        return responseResult;
    }
}
